﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
using System.Data;
namespace BUS
{
    public class LoaiSachBUS
    {
    #region 1. Them
        public static bool ThemLoaiSach(LoaiSachDTO loaisach)
        {
            return LoaiSachDAO.ThemLoaiSach(loaisach);
        }
    #endregion
    #region 2. Xoa
        public static bool XoaLoaiSachByID(String maloaisach)
        {
            return LoaiSachDAO.XoaLoaiSachByID(maloaisach);
        }
    #endregion
    #region 3. Sua
        public static bool SuaLoaiSach(LoaiSachDTO loaisach)
        {
            return LoaiSachDAO.SuaLoaiSach(loaisach);
        }
    #endregion
    #region 4. Tim kiem
        public static LoaiSachDTO TimLoaiSachByID(String maloaisach)
        {
            if (!LoaiSachDAO.CheckLoaiSachByID(maloaisach))
                return null;
            return LoaiSachDAO.TimLoaiSachByID(maloaisach);
        }
        public static DataTable TimTatCaLoaiSach(){
            return LoaiSachDAO.TimTatCaLoaiSach();
        }
    #endregion
    }
}
